package com.liu.fresh.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.liu.fresh.biz.IAddrInfoBiz;
import com.liu.fresh.entity.AddrInfo;

@Controller
@RequestMapping("/addrInfo")
public class AddrInfoController  {
	@Autowired
	private IAddrInfoBiz addrInfoBiz;

	
	@RequestMapping("/add")
	@ResponseBody
	private Integer add(String mno, String name, String tel, String province, String city, String area, String addr,String flag) {
		return addrInfoBiz.add(mno, name, tel, province, city, area, addr, flag);
	}
	
	@RequestMapping("/finds")
	@ResponseBody
	private List<AddrInfo> finds(String mno) {
		return addrInfoBiz.finds(mno);
	}
	
	@RequestMapping("/setFlag")
	@ResponseBody
	private int setFlag(String ano,int flag) {
		return addrInfoBiz.setFlag(ano,flag);
	}
}
